package com.ruoyi.baseInfo.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 顾客信息表 customer_info
 *
 * @author ruoyi
 */
public class Customer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 顾客ID */
    private Long customerId;

    /** 公司ID */
    private Long companyId;

    /** 顾客姓名 */
    private String customerName;

    /** 顾客电话 */
    private String customerTel;

    /** 顾客地址 */
    private String customerAddr;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    @NotBlank(message = "顾客姓名不能为空")
    @Size(min = 0, max = 10, message = "顾客姓名不能超过10个字符")
    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @NotBlank(message = "顾客电话不能为空")
    @Size(min = 0, max = 11, message = "顾客电话不能超过11个字符")
    public String getCustomerTel() {
        return customerTel;
    }

    public void setCustomerTel(String customerTel) {
        this.customerTel = customerTel;
    }

    @NotBlank(message = "顾客地址不能为空")
    @Size(min = 0, max = 100, message = "顾客地址不能超过100个字符")
    public String getCustomerAddr() {
        return customerAddr;
    }

    public void setCustomerAddr(String customerAddr) {
        this.customerAddr = customerAddr;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("customerId", getCustomerId())
                .append("companyId", getCustomerId())
                .append("customerName", getCustomerName())
                .append("customerTel", getCustomerTel())
                .append("customerAddr", getCustomerAddr())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
